#!/bin/sh
source /etc/clara.sh
sql=`date '+%Y-%m-%d_%H-%M-%S'`.sql
mysqldump --all-databases > $sql --user=$username --password $pas
md5=$sql
if [ "use_ftp" == "yes" ]
then
./ftp $ftp_username $ftp_pas $ftp_server $sql
else
echo """
hi
i'm clara. a server Manager bot
this is the Backup for your databases system
file md5:
$md5
"""|mutt -a $sql -s "database Backup for "`date '+%Y-%m-%d_%H-%M-%S'` -- $email
fi
rm $sql
